package org.jeecg.modules.workflow.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.workflow.entity.BpmProcessDefinitionExt;

import java.util.Collection;
import java.util.List;

/**
 * Bpm 流程定义的拓展
Mapper接口
 *
 * @author whnk
 * @date 2022-04-20
 */
public interface BpmProcessDefinitionExtMapper extends BaseMapper<BpmProcessDefinitionExt>
{
    default List<BpmProcessDefinitionExt> selectListByProcessDefinitionIds(Collection<String> processDefinitionIds) {
        return selectList(new QueryWrapper<BpmProcessDefinitionExt>().in("process_definition_id", processDefinitionIds));

    }

    default BpmProcessDefinitionExt selectByProcessDefinitionId(String processDefinitionId) {
        return selectOne(new QueryWrapper<BpmProcessDefinitionExt>().eq("process_definition_id", processDefinitionId));
    }
}
